package com.black.system.domain.resp.monitor;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.black.common.annotation.DictDataProperty;
import com.black.system.excelconvert.SysDictDataConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @author L
 */
@Getter
@Setter
@ApiModel(value = "SysOperLogResp", description = "操作日志响应对象")
@ExcelIgnoreUnannotated
public class SysOperLogResp {

    @ExcelProperty(value = "日志主键", index = 0)
    @ApiModelProperty(value = "日志编号")
    private Long operId;

    @ExcelProperty(value = "操作模块", index = 1)
    @ApiModelProperty(value = "操作模块")
    private String title;

    @ExcelProperty(value = "业务类型", converter = SysDictDataConverter.class, index = 2)
    @DictDataProperty(value = "sys_oper_type")
    @ApiModelProperty(value = "业务类型（0其它 1新增 2修改 3删除）")
    private String businessType;

    @ExcelProperty(value = "操作人员", index = 3)
    @ApiModelProperty(value = "操作人员")
    private String operName;

    @ExcelProperty(value = "操作地址", index = 4)
    @ApiModelProperty(value = "操作地址")
    private String operIp;

    @ExcelProperty(value = "操作地点", index = 5)
    @ApiModelProperty(value = "操作地点")
    private String operLocation;

    @ExcelProperty(value = "操作状态", converter = SysDictDataConverter.class, index = 6)
    @DictDataProperty(value = "sys_common_status")
    @ApiModelProperty(value = "操作状态")
    private String status;

    @ExcelProperty(value = "操作时间", index = 7)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "操作时间")
    private Date operTime;

    @ExcelProperty(value = "执行时间/ms", index = 8)
    @ApiModelProperty(value = "执行时间")
    private Long costTime;
}
